<template>
  <div class="loading-no-data-container">
    <div v-if="!loading && data.length === 0" class="no-data-container">
      <img class="part-no" src="https://image.doulaoban.com/applet/image/1712135918667_暂无内容 1.png" alt="" />
      <div class="joke">{{ text }}</div>
    </div>
  </div>
</template>
<script>
  export default {
    props: {
      loading: {
        type: Boolean,
        default() {
          return false;
        },
      },
      text: {
        type: String,
        default() {
          return '暂无数据';
        },
      },
      data: {
        type: Array,
        default() {
          return [];
        },
      },
    },
  };
</script>
<style lang="less" scoped>
  .loading-no-data-container {
    .no-data-container {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;

      .part-no {
        width: 160px;
        height: 162px;
        margin-top: 80px;
      }

      .joke {
        margin-top: 16px;
        font-family: 'PingFang SC';
        font-size: 14px;
        font-style: normal;
        font-weight: 400;
        line-height: 20px; /* 142.857% */
        color: #737e97;
        text-align: center;
      }

      .nomore_div {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-top: 25px;

        img {
          display: block;
          width: 112px;
          height: 28.5px;
        }
      }
    }
  }
</style>
